package entity;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import org.hibernate.annotations.ForceDiscriminator;

@Entity
@DiscriminatorValue("Opportunity")
@ForceDiscriminator
public class Opportunity extends SWOTElement {

	@ManyToOne(fetch = FetchType.LAZY)
	@Cascade(CascadeType.SAVE_UPDATE)
	private SWOT swot;

	public void setSwot(SWOT swot) {
		this.swot = swot;
	}

	public SWOT getSwot() {
		return swot;
	}	
}
